package com.zxl.designpattern.structure.decorator;

/**
 * 抽象装饰器
 *
 * @author zxl
 */
public abstract class CarDecorator implements Car {

    // 持有一个Car对象的引用
    private Car car;

    public CarDecorator(Car car) {
        this.car = car;
    }

    @Override
    public String getDescription() {
        return car.getDescription();
    }

    @Override
    public double getCost() {
        return car.getCost();
    }
}